import request from '@/utils/request'

// 查询开门记录列表
export function listOpenlock(query) {
  return request({
    url: '/lock/openlock/list',
    method: 'get',
    params: query
  })
}

// 查询开门记录详细
export function getOpenlock(id) {
  return request({
    url: '/lock/openlock/' + id,
    method: 'get'
  })
}

// 新增开门记录
export function addOpenlock(data) {
  return request({
    url: '/lock/openlock',
    method: 'post',
    data: data
  })
}

// 修改开门记录
export function updateOpenlock(data) {
  return request({
    url: '/lock/openlock',
    method: 'put',
    data: data
  })
}

// 删除开门记录
export function delOpenlock(id) {
  return request({
    url: '/lock/openlock/' + id,
    method: 'delete'
  })
}
